import React from 'react';
import { HashRouter  as Router, Route} from 'react-router-dom';
import { createHashHistory } from 'history';
import Header from "./header.js"
import Footer from "./footer.js";
const {history}=createHashHistory;
import Food from './food';
import Confirm from './confirm';
import Welcome from './welcome';
import Success from "./success.js";
import Login from './login.js';
import Order from './order';

import "./style/index.css"

export default class App extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        return <Router>
            <div style={{height:"100%"}}>
                {/* {sessionStorage?<Redirect exact path="/" to="/login?storeId=123&tableId=8"/>:""} */}
                    <Route path="/index" component={Welcome}></Route>
                    <Route path="/login" component={Login}></Route>
                    <Route path="/product" component={Food}></Route>
                    <Route path="/confirm" component={Confirm}></Route>
                    <Route path="/success" component={Success}></Route>
                    <Route path="/order" component={Order}></Route>
            </div>
        </Router>
    }
}